#ifndef LEVEL_HPP
#define LEVEL_HPP
 
//! The Level class manages experience and level and will indicate when a
//! level-up has occurred.

class Level
{
public:
    //! This is the number of level ups that can occur as well as the maximum
    //! level this class will allow. This means you start off at level 0.
    static const unsigned int MAX;
    //! The maximum experience this class will allow. This doesn't have to
    //! be the experience required to achieve Level::MAX level.
    static const unsigned int MAX_EXP;

    //! Level starts off at 0.
    Level();
    virtual ~Level();
    
    //! \return The current experience.
    virtual unsigned int GetExperience() const;
    //! \return The amount of experience required to advance to the next
    //!         level.
    virtual unsigned int GetExperienceToLevel() const;
    //! \return The current level.
    virtual unsigned int GetLevel() const;
    
    //! Adds experience and checks for level ups.
    //! \param exp The experience to add.
    //! \return The number of level ups that occurred.
    virtual unsigned int AddExperience(unsigned int exp);
    //! Levels up and sets experience to the minimum amount required for the
    //! level.
    virtual void LevelUp();
    
protected:
    unsigned int m_exp;
    unsigned int m_lvl;
};

#endif 
